<%--
  Created by IntelliJ IDEA.
  User: XYC
  Date: 2015/7/9
  Time: 13:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>

<link href="${css}/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="${css}/bootstrap-datetimepicker.min.css"  rel="stylesheet" media="screen">

<table>
  <tr>
    <td>性别：</td>
    <td>
      <select id="gender"></select>
    </td>
    <td>出生日期：</td>
    <td>
      <div class="form-group">
        <div id="birthday" class="input-group date form_date col-md-5" style="width: auto"  data-date-format="yyyy-mm-dd">
          <input class="form-control" size="16" type="text" value="${Patient.birthdayOfString}" readonly>
          <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
        </div>
      </div>
    </td>
    <td>与户主关系：</td>
    <td>
      <select id="relationship"></select>
    </td>
  </tr>
  <tr>
    <td>工作单位：</td>
    <td><input id="workCompany" type="text" size="8"></td>
    <td>本人电话：</td>
    <td><input id="phone" type="text" size="8"></td>
    <td>民族：</td>
    <td><select id="nationality"></select></td>
  </tr>
  <tr>
    <td>联系人：</td>
    <td><input id="contacts" type="text" size="8"></td>
    <td>联系人电话：</td>
    <td><input id="contactPhone" type="text" size="8"></td>
    <td>文化程度：</td>
    <td><select id="degree"></select></td>
  </tr>
  <tr>
    <td>血型：</td>
    <td><select id="bloodType"></select></td>
    <td>户口性质</td>
    <td><select id="hukouType"></select></td>
    <td>婚姻状况：</td>
    <td><select id="maritalState"></select></td>
  </tr>
  <tr>
    <td>RH阴性：</td>
    <td><select id="rhType"></select></td>
    <td>职业：</td>
    <td><select id="career"></select></td>
    <td>国籍：</td>
    <td><select id="nation"></select></td>
  </tr>
  <tr>
    <td>援助类型：</td>
    <td><select id="aidType"></select></td>
    <td>电子邮箱：</td>
    <td><input id="email" type="text" size="12"></td>
    <td>邮编：</td>
    <td></select><input id="postcode" type="text" size="12"></td>
  </tr>
  <tr>
    <td>家庭住址：</td>
    <td colspan="3"><input id="homeAddress"  type="text" /></td>
    <td>常住类型：</td>
    <td><select id="permanentType"></select></td>
  </tr>
  <tr>
    <td>户籍住址：</td>
    <td colspan="3"><input id="registerAddress"  type="text"  size="25"/></td>
    <td>证件类型：</td>
    <td><select id="cardKind"></select></td>
  </tr>
  <tr>
    <td>负性事件：</td>
    <td colspan="2"><select id="negativeEvents"></select></td>
    <td><input id="negativeEventsExtra" type="text" /></td>
    <td>管理单位：</td>
    <td><input id="company" /></td>
  </tr>
  <tr>
    <td colspan="4"></td>
    <td>建档日期：</td>
    <td><input id="createdTime" /></td>
  </tr>
</table>

<script type="text/javascript" src="${js}/jquery.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="${js}/bootstrap.min.js"></script>
<script type="text/javascript" src="${js}/bootstrap-dateTime/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="${js}/bootstrap-dateTime/locales/bootstrap-datetimepicker.zh-CNxyc.js" ></script>
<script type="text/javascript" src="${js}/dean.js" ></script>
<script type="text/javascript">
  function init(){
    $("#birthday").datetimepicker({
      language:  'zh-CN',
      weekStart:  0,
      todayBtn: true,
      autoclose:  1,
      todayHighlight: 1,
      startView: 2,
      minView: 2,
      forceParse: 0
    });
    var patient=${patient};
    <%--var gen =${map};--%>
    addSelect(${gender},"gender","code","name");
    $("#gender").val(patient.gender);
    addSelect(${relationship},"relationship","code","name");
    $("#relationship").val(patient.relationship);//
    $("#workCompany").val(patient.workCompany);
    $("#phone").val(patient.phone);
    addSelect(${nationality},"nationality","code","name");
    $("#nationality").val(patient.nationality);
    $("#contacts").val(patient.contacts);
    $("#contactPhone").val(patient.contactPhone);
    addSelect(${degree},"degree","code","name");
    $("#degree").val(patient.degree);
    addSelect(${bloodType},"bloodType","code","name");
    $("#bloodType").val(patient.bloodType);

    addSelect(${hukouType},"hukouType","code","name");
    $("#hukouType").val(patient.hukouType);
    addSelect(${maritalState},"maritalState","code","name");
    $("#maritalState").val(patient.maritalState);


    addSelect(${rhType},"rhType","code","name");
    $("#rhType").val(patient.rhType);
    addSelect(${aidType},"aidType","code","name");
    $("#aidType").val(patient.aidType);
    addSelect(${career},"career","code","name");
    $("#career").val(patient.career);
    addSelect(${nation},"nation","code","name");
    $("#nation").val(patient.nation);

    addSelect(${aidType},"aidType","code","name");
    $("#aidType").val(patient.aidType);
    $("#email").val(patient.email);
    $("#postcode").val(patient.postcode);

    $("#homeAddress").val(patient.homeAddress);
    addSelect(${permanentType},"permanentType","code","name");
    $("#permanentType").val(patient.permanentType);

    $("#registerAddress").val(patient.registerAddress);
    addSelect(${cardKind},"cardKind","code","name");
    $("#cardKind").val(patient.cardKind);

    $("#company").val(patient.company);

    $("#createdTime").val(patient.createdTimeOfString);
  }
  $(document).ready(function(){
//    alert("xyc");
    init();
  });
</script>


